package com.qiantu.api.entity;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Transient;
import org.greenrobot.greendao.annotation.Unique;
import org.greenrobot.greendao.annotation.Generated;

import java.io.Serializable;
import java.util.List;

@Entity
public class ControllerBean  implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id(autoincrement = true)
    private Long localId;
    @Unique
    private String controllerSerialNo;
    private String masterSerialNo;
    private String name;
    private String productModel;
    //网关Id：当主网关是就是设备Sn，当从设备时就是主设备SN
    private String gatewayId;
    private String deviceMac;
    //设备Sn标识（长码：用户输入短码库存换取）
    private String deviceSn;
    private String productInfoSerialNo;
    private Boolean isDisable;
    private String imageUrl;
    private String version;
    private String ip;
    private Boolean isSlave;
    //在线状态：离线 = 0,在线 = 1,未知 = 2,网络异常 = 3,
    private Integer stateType;
    private String seriesNumber;
    private String seriesName;
    private String latestVersion;
    private String codeNo;
    private String houseSerialNo;
    private String ssid;
    private int sort;
    @Transient
    private List<DeviceBean> deviceItems;
    @Transient
    private List<ControllerBean> slaveArr;

    public List<ControllerBean> getSlaveArr() {
        return slaveArr;
    }

    public void setSlaveArr(List<ControllerBean> slaveArr) {
        this.slaveArr = slaveArr;
    }

    @Transient
    private ControllerProductInfoBean productInfoDto;
    @Transient
    private ControllerProtocolBean protocol;
    @Transient
    private ControllerSettingDto controllerSettingDto;
    @Transient
    private List<ControllerBrandProtocolBean> brandProtocols;

    @Generated(hash = 1500091011)
    public ControllerBean(Long localId, String controllerSerialNo, String masterSerialNo,
            String name, String productModel, String gatewayId, String deviceMac,
            String deviceSn, String productInfoSerialNo, Boolean isDisable, String imageUrl,
            String version, String ip, Boolean isSlave, Integer stateType,
            String seriesNumber, String seriesName, String latestVersion, String codeNo,
            String houseSerialNo, String ssid, int sort) {
        this.localId = localId;
        this.controllerSerialNo = controllerSerialNo;
        this.masterSerialNo = masterSerialNo;
        this.name = name;
        this.productModel = productModel;
        this.gatewayId = gatewayId;
        this.deviceMac = deviceMac;
        this.deviceSn = deviceSn;
        this.productInfoSerialNo = productInfoSerialNo;
        this.isDisable = isDisable;
        this.imageUrl = imageUrl;
        this.version = version;
        this.ip = ip;
        this.isSlave = isSlave;
        this.stateType = stateType;
        this.seriesNumber = seriesNumber;
        this.seriesName = seriesName;
        this.latestVersion = latestVersion;
        this.codeNo = codeNo;
        this.houseSerialNo = houseSerialNo;
        this.ssid = ssid;
        this.sort = sort;
    }

    @Generated(hash = 2047525374)
    public ControllerBean() {
    }

    public String getControllerSerialNo() {
        return controllerSerialNo;
    }

    public void setControllerSerialNo(String controllerSerialNo) {
        this.controllerSerialNo = controllerSerialNo;
    }

    public String getMasterSerialNo() {
        return masterSerialNo;
    }

    public void setMasterSerialNo(String masterSerialNo) {
        this.masterSerialNo = masterSerialNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getProductModel() {
        return productModel;
    }

    public void setProductModel(String productModel) {
        this.productModel = productModel;
    }

    public String getGatewayId() {
        return gatewayId;
    }

    public void setGatewayId(String gatewayId) {
        this.gatewayId = gatewayId;
    }

    public String getDeviceMac() {
        return deviceMac;
    }

    public void setDeviceMac(String deviceMac) {
        this.deviceMac = deviceMac;
    }

    public String getProductInfoSerialNo() {
        return productInfoSerialNo;
    }

    public void setProductInfoSerialNo(String productInfoSerialNo) {
        this.productInfoSerialNo = productInfoSerialNo;
    }
    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Boolean isIsSlave() {
        return isSlave;
    }

    public void setIsSlave(Boolean isSlave) {
        this.isSlave = isSlave;
    }

    public Integer getStateType() {
        return stateType == null ? 0 : stateType;
    }

    public void setStateType(Integer stateType) {
        this.stateType = stateType;
    }

    public void setIsDisable(Boolean isDisable) {
        this.isDisable = isDisable;
    }

    public Boolean isIsDisable() {
        return isDisable;
    }

    public String getSeriesNumber() {
        return seriesNumber;
    }

    public void setSeriesNumber(String seriesNumber) {
        this.seriesNumber = seriesNumber;
    }

    public String getSeriesName() {
        return seriesName;
    }

    public void setSeriesName(String seriesName) {
        this.seriesName = seriesName;
    }

    public String getLatestVersion() {
        return latestVersion;
    }

    public void setLatestVersion(String latestVersion) {
        this.latestVersion = latestVersion;
    }

    public String getCodeNo() {
        return codeNo;
    }

    public void setCodeNo(String codeNo) {
        this.codeNo = codeNo;
    }

    public Long getLocalId() {
        return this.localId;
    }

    public void setLocalId(Long localId) {
        this.localId = localId;
    }

    public Boolean getIsDisable() {
        return this.isDisable;
    }

    public Boolean getIsSlave() {
        return this.isSlave;
    }

    public List<DeviceBean> getDeviceItems() {
        return deviceItems;
    }

    public void setDeviceItems(List<DeviceBean> deviceItems) {
        this.deviceItems = deviceItems;
    }

    public String getDeviceSn() {
        return deviceSn;
    }

    public void setDeviceSn(String deviceSn) {
        this.deviceSn = deviceSn;
    }

    public String getHouseSerialNo() {
        return houseSerialNo;
    }

    public void setHouseSerialNo(String houseSerialNo) {
        this.houseSerialNo = houseSerialNo;
    }

    public ControllerProductInfoBean getProductInfoDto() {
        return productInfoDto;
    }

    public void setProductInfoDto(ControllerProductInfoBean productInfoDto) {
        this.productInfoDto = productInfoDto;
    }

    public ControllerProtocolBean getProtocol() {
        return protocol;
    }

    public void setProtocol(ControllerProtocolBean protocol) {
        this.protocol = protocol;
    }

    public List<ControllerBrandProtocolBean> getBrandProtocols() {
        return brandProtocols;
    }

    public void setBrandProtocols(List<ControllerBrandProtocolBean> brandProtocols) {
        this.brandProtocols = brandProtocols;
    }

    public String getSsid() {
        return ssid;
    }

    public void setSsid(String ssid) {
        this.ssid = ssid;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public ControllerSettingDto getControllerSettingDto() {
        return controllerSettingDto;
    }

    public void setControllerSettingDto(ControllerSettingDto controllerSettingDto) {
        this.controllerSettingDto = controllerSettingDto;
    }
}
